{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/header.html"}
{literal}
<script type="text/javascript">
    $(function(){
        $('.assortment').hover(function(){
            $('.assort_list').stop().fadeIn();
        },function(){
            $('.assort_list').stop().fadeOut();
        });
    });
</script>
<script type="text/javascript" src="/js/user.js"></script>
<style>
    .assort_list{display: none;}
</style>
{/literal}

<div class="help_center">

<div class="crumbs_tmg" style="padding-top:0;">当前位置：<a href="#">首页</a><i class="ffs">></i><a href="#">会员中心</a><i class="ffs">></i><span class="blue">报价管理</span></div>

    {include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/menu_title.html"}

    <div class="user_content">
    	<h3 class="user_title j_ut">
        	<ul>
            	<li class="curr">报价管理</li>
            </ul>
        </h3>
        
        
        <div class="receiving_address">
            <div class="ra_icon">
                <div class="fl">
                    操作：<a href="/user/downquote/type/rmb" class="down_icon"><i></i>下载模板</a><a href="/supply/supplylist?id={if $business_info neq ''}{$business_info.business_id}{/if}" class="preview_icon"><i></i>在线预览</a><a href="javascript:void (0)" class="quotation_icon update_quote" bid="{if $business_info neq ''}{$business_info.business_id}{/if}"><i></i>刷新报价</a>
                </div>
                <span class="fr gray">报价更新时间： {$business_info.quotation_update_time}</span>
            </div>
            
            <div class="resource_search">
                <form name="search_quote" method="get" action="">
                品种：<input type="text" name="cate_name" class="rs_ph" value="{$cate_name}"/>
                牌号：<input type="text" name="product_name" class="rs_ph" value="{$product_name}"/>
                厂商：<input type="text" name="brand_name" class="rs_ph" value="{$brand_name}"/>
                状态：<select name="status" class="rs_ph">
                        <option value="0">请选择状态</option>
                        {foreach from=$_suppliyStateMean key=key item=item}
                        <option value="{$key}" {if $status eq $key} selected {/if}>{$item}</option>
                        {/foreach}
                      </select>
                    <input class="rs_ph_btn" type="submit" value="搜  索"/>
                </form>
            </div>
            
            <ul class="rs_bar">
            	<li {if $status eq ''} class="curr" {/if}><a href="/user/quotemanage">全部状态</a><i>({$totalItems_all})</i></li>
                <li {if $status eq '1'} class="curr" {/if}><a href="/user/quotemanage?status=1">待审核</a><i>({$totalItems_audit})</i></li>
                <li {if $status eq '2'} class="curr" {/if}><a href="/user/quotemanage?status=2">已上架</a><i>({$totalItems_up})</i></li>
                <li {if $status eq '3'  } class="curr" {/if}><a href="/user/quotemanage?status=3">下架</a><i>({$totalItems_down})</i></li>
                <li {if $status eq '4'  } class="curr" {/if}><a href="/user/quotemanage?status=4">审核不通过</a><i>({$totalItems_cancel})</i></li>
            </ul>
            
            <ul class="rs_tmn">
            	<li class="w93">品种</li>
                <li class="w93">牌号</li>
                <li class="w93">厂商</li>
                <li class="w93">单价</li>
                <li class="w93">数量(吨)</li>
                <li class="w93">交易类型</li>
                <li class="w93">交货地</li>
                <li class="w93">交货时间</li>
                <li class="w93">状态</li>
                <li class="w93">操作</li>
            </ul>
            
            <ul class="rs_list_items quote_ul">
                {if !$data}
                <li class="tac" style="padding-top: 10px;">暂无报价，亲 请去报价吧！</li>
                {else}
                {foreach from=$data key=key item=item}
            	<li>
                	<div class="wb_text">
                        <input class="rt_text1" type="hidden" name="id" value="{$item.id}"/>
                        <span class="rs_i_text1"><input type="checkbox" class="check_box mr5"></span>
                        <span class="rs_i_text2">{if $item.cate_name neq ''}{$item.cate_name}{else} 0{/if}</span>
                        <span class="rs_i_text">{if $item.product_name neq ''}{$item.product_name}{else} 0{/if}</span>
                        <span class="rs_i_text">{if $item.brand_name neq ''}{$item.brand_name}{else} 0{/if}</span>
                        <span class="rs_i_text orange">{$item.currency_mark}{$item.price}</span>
                        <span class="rs_i_text">{if $item.num neq ''}{$item.num}{else} 0{/if}</span>
                        <span class="rs_i_text">{if $item.service_name neq ''}{$item.service_name}{else} 0{/if}</span>
                        <span class="rs_i_text">{if $item.area_name neq ''}{$item.area_name}{else} 0{/if}</span>
                        <span class="rs_i_text">{if $item.delivery_time neq ''}{$item.delivery_time}{else} 0 {/if}</span>
                        <span class="rs_i_text" title="{$item.operate_remark}">{if $item.status neq ''}{$_suppliyStateMean[$item.status]}{else} 0 {/if}</span>
                        <span class="rs_i_text"><a href="#" class="blue mr5 edit_btn">编辑</a><a href="javascript:void(0)" class="del_quote">删除</a></span>
                    </div>
                    <div class="wb_input">
                        <input class="rt_text1" type="hidden" name="quote_id" value="{$item.id}"/>
                        <input class="rt_text1" type="hidden" name="product_id" value="{$item.product_id}"/>
                    	<span class="rs_i_text1"><input type="checkbox" class="check_box mr5"></span>
                        <span class="rs_i_text2"><input class="rt_text1" type="text" name="cate_name" value="{$item.cate_name}"/></span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="product_name" value="{$item.product_name}"/></span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="brand_name" value="{$item.brand_name}"/></span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="price" onkeyup="this.value=this.value.replace(/[^\d.]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d.]/g,'')" value="{$item.price}"/></span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="num" onkeyup="this.value=this.value.replace(/[^\d.]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d.]/g,'')" value="{$item.num}"/></span>
                        <span class="rs_i_text">
                            <select class="rt_text" name="service_id" id="service_id">
                                {if $service_info neq ''}
                                {foreach from=$service_info key=key item=items}
                                <option value="{$items.id}" {if $items.id eq $item.service_id} selected {/if}>{$items.service_name}</option>
                                {/foreach}
                                {/if}
                            </select>
                        </span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="area_name" value="{$item.area_name}"/></span>
                        <span class="rs_i_text"><input class="rt_text" type="text" name="delivery_time" value="{$item.delivery_time}"/></span>
                        <span class="rs_i_text">{$_suppliyStateMean[$item.status]}</span>
                        <span class="rs_i_text"><a href="javascript:void(0)" class="blue mr5 save_edit_quote">确认</a><a href="javascript:void(0)" class="cancel_btn">取消</a></span>
                    </div>
                </li>
                {/foreach}
                {/if}
            </ul>
            <div class="operation">
                <label><input name="" type="checkbox" value="" class="check_box mr5 quote_check_all"/>全选</label>
                <a href="javascript:void(0)" class="opera_btn curr quote_up">上架</a>
                <a href="javascript:void(0)" class="opera_btn quote_down">下架</a>
                <a href="javascript:void(0)" class="opera_btn quote_del">批量删除</a>
                <a href="javascript:void(0)" class="opera_btn quote_download">导出Excel</a>
            </div>
            <div class="page tar ptb10p" id="page">{$links}</div>
        </div>
        
    </div>
</div>

{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/footer.html"}